import request from '@/common/utils/request'
import {
	serv
} from '@/common/utils/config'

// 修改用户信息
export function updateUserinfo(data) {
	return request(serv.sysrest + `/api/basic/update`, {
		method: `post`,
		data: data
	})
}

// 修改密码
export function modifyPassword(data) {
	return request(serv.sysrest + `/api/user/modifyPasswd`, {
		method: `post`,
		data: data
	})
}

// 获取微信绑定信息
export function getMobileBindInfo(data) {
	return request(serv.sysrest + `/api/wxmp/getMobileBindInfo`, {
		method: `get`,
		data: data
	})
}

// 微信解绑
export function unBindWx() {
	return request(serv.sysrest + `/api/wxmp/unBind`, {
		method: `get`
	})
}
//sss
export function switch111(data) {
	return request(serv.sysrest + `/api/user/changeLoginDept`, {
		method: `get`,
		data: data
	})
}
// 获取是否屏蔽供应商信息配置
export function showRuleSupplierInfoShow() {
	return request(serv.order + `/api/goods/queryGoodsShowRuleSupplierInfoShow`, {
		method: `get`,
	})
}
// 获取配置
export function qryConfByItemCode(data) {
	return request(serv.config + `/api/conf/qryConfByItemCode`, {
		method: `get`,
		data: data
	})
}

export function listCustomerGroupBySupplierId(data,path){
	return request(serv.supplier + `/api/supplier/listCustomerGroupBySupplierId${path?'?'+path:''}`,{
		method: 'get',
		data: data
	})
}
export function getCustomerGroupBySupplierId(data){
	return request(serv.supplier + '/api/supplier/getCustomerGroupBySupplierId',{
		method: 'get',
		data: data
	})
}

export function countByStatus(data){
	return request(serv.order + '/api/orders/countByStatus',{
		method: 'get',
		data: data
	})
}
export function countByShippedStatus(data){
	return request(serv.order + '/api/orders/countByShippedStatus',{
		method: 'get',
		data: data
	})
}